/**
 * 注册时浏览隐私条款
 * Created by Administrator on 2017/2/17.
 */
module.exports = function ($rootScope, $scope,$state,$anchorScroll, $location) {

    $scope.init = function () {

    };

    $scope.init();

    //注册
    $scope.registerparticulars=function () {
        $state.go("register");
    };
    //登录
    $scope.loginparticulars=function () {
        $state.go("login");
    };
    //隐私政策
    $scope.mprivacyStatemant=function () {
      $location.hash('termService');
      $anchorScroll();
        // $state.go("privacyStatemant");
        roll();
    };
    //联系我们
    $scope.mcontact=function () {

      $location.hash('termService');
      $anchorScroll();
        // $state.go("contact");
        roll();
    };
    //关于我们
    $scope.mcontactwe=function () {
      $location.hash('contact');
      $anchorScroll();
        $state.go("regardsWe");
        roll();
    };
    //服务条款
    $scope.mtermService=function () {
      $location.hash('contact');
      $anchorScroll();
        $state.go("termService");
        roll();
    };

    function roll() {
        $anchorScroll.yOffset = 500;// 总是滚动额外的50像素
        // 将location.hash的值设置为
        // 你想要滚动到的元素的id
        // $location.hash('ybcabelist');
        // 调用 $anchorScroll()
        $anchorScroll();
    }

}
